/**
 * 
 */
package com.zc.BankCreditManagement.Test;

import java.util.ArrayList;

import com.zc.BankCreditManagement.DAO.CustomerDAO;
import com.zc.BankCreditManagement.Exception.ZCException;
import com.zc.BankCreditManagement.ServiceImpl.CustomerServiceImpl;

/**
 * @author ZhangCheng
 * @time 2019年9月16日
 * 	《银行信贷管理系统》客户管理模块 
 */
public class TestCus {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
//		Customer cus = new Customer("126", "zc", "zry", "中国", "430000");
		CustomerServiceImpl cusDAO = new CustomerServiceImpl();
//		try {
//			System.out.println(cusDAO.getCustomerInfoById("12").getInfo());
//		}catch (NullPointerException e) {
//			System.err.println("未查询到该数据！请检查您的Id值是否正确！");
//		}
		System.out.println(cusDAO.getThisInfoById(1234,true).getInfo());
//		cusDAO.deleteThisCusToDB("123");
		
//		for(Customer c : cusDAO.getCustomersBySQLFromDB("select * from customer where mailCode = '430000'")) {
//			System.out.println(c.getInfo());
//		}
		
//		CustomerCreditLevel cusLevel = new CustomerCreditLevel("123", "01", "2019-05-05", "2019-10-10");
//		cus.setcCL(cusLevel);
//		
//		ArrayList<CustomerCreditLevelHistory> cusLevelHis = new ArrayList<CustomerCreditLevelHistory>();
//		for(int i = 0; i < 15; i++ ) {
//			cusLevelHis.add(new CustomerCreditLevelHistory("0"+(i+1), "123"+i, "01", "2019-05-05", "2019-10-10"));
//		}
//		cus.setcCLH(cusLevelHis);
//		System.out.println(cus.getInfo());
//		System.out.println("\t-" + cus.getcCL().getInfo());
//		for(int i = 0; i < cus.getcCLH().size(); i++) {
//			System.out.println("\t--"+ cus.getcCLH().get(i).getInfo());
//		}
		
	}

}
